Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image: set up history array on exported image config #196

Merged
merged 4 commits into from
Dec 9, 2017

Conversation

tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Dec 9, 2017

based on #195

This PR fills in history array records, either from dockerfile commands or LLB descriptions. It also optimizes out empty layers and sets their history records to reflect that.

Note the history items from dockerfile aren't 100% compatible with docker but carry the same content for the user. For the commands that were executed by LLB, the vertex digest is added as well. This should be replaced by cache checksum in the future but avoids wrong cache hits in other builders that are based on history array because the record wouldn't be unique otherwise. Buildkit itself will likely share cache on a side channel or write it as a single binary value and not repurpose history array for this. Unlike docker, the history records also don't use sh -c #(nop) prefixes. This is put there in docker because old versions used the same field for the commands of intermediate images but it carries no information to the user.

@tonistiigi tonistiigi force-pushed the history branch 2 times, most recently from 3e808c2 to e5b1add Compare December 9, 2017 02:10
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@AkihiroSuda AkihiroSuda merged commit e15cbb0 into moby:master Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants